package com.usian.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.usian.pojo.User;

public class GlobalBlockHandler {
    /**
     * 1、必须使用static修饰
     * 2、返回值必须和controller方法返回值一致
     * 3、参数必须和controller方法参数一致，再加一个BlockException
     */
    public static User blockHandlerMethod(Integer id,BlockException e){
        return new User(id,"this is blockHandlerMethod of ",0);
    }
}